import 'package:aihu_getx_app/app/modules/chat/views/chat_view.dart';
import 'package:aihu_getx_app/app/modules/d/d_index/views/d_index_view.dart';
import 'package:aihu_getx_app/app/modules/d/d_my/views/d_my_view.dart';
import 'package:aihu_getx_app/app/modules/d/d_workbench/views/d_workbench_view.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../controllers/d_home_controller.dart';

class DHomeView extends GetView<DHomeController> {
  const DHomeView({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: PageView(
        controller: controller.pageController,
        onPageChanged: controller.changePageIndex,
        children: const [
          DIndexView(),
          DWorkbenchView(),
          ChatView(),
          DMyView(),
        ],
      ),
      bottomNavigationBar: controller.bottomNavigationBar(),
    );
  }
}
